/**
 * Created by chenwenhao586 on 2017/6/1.
 * @description 存放整个程序全局变量
 */

'use strict';
import {BehaviorSubject} from "rxjs/BehaviorSubject";

export let isVisibleForAdvertisement: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(true);
/**
 * @description 下载横幅应用宝链接
 * @type {string}
 */
export const advertisementUrl = 'http://a.app.qq.com/o/simple.jsp?pkgname=com.hhly.community';

/**
 * @description 默认头像
 * @type {string}
 */
export const defaulticon = 'assets/icon/concern_default_head.png';

/**
 * @description 头部菜单icon折叠状态
 * @type {BehaviorSubject<boolean>}
 */
export let isUnfold: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);


/**
 * @description app images 配置
 * @method path:app 图片路径，imagesPath：图片根路径，iconsPath：icon根路径 @author 陈文豪 @date 2017-08-24
 * @type {{path: {imagesPath: string; iconsPath: string}}}
 */
export const imageUtil = {
  path: {
    imagesPath: 'assets/images/',
    iconsPath: 'assets/icon/'
  }
};
/**
 * @description 开发环境HTTP请求头地址
 * @author 陈文豪
 * @date 2017-8-24
 * @method
 *  TEST:测试地址
 *  DEV:开发地址
 *  PRODUCTION:生产地址
 *  BASE:平台测试环境
 *  BIZ:应用测试环境
 *  PROFIT:盈利测试环境
 * @type {{test: string; dev: string; production: string; base: string; biz: string; profit: string}}
 */
export const API_HOST = {
  // TEST: 'http://wechat2.oooseed.cn',
  // DEV: 'http://wechat2.oooseed.cn', // 测试二次分享的
   // DEV: 'http://wx.hhlyty.com',
  DEV: 'http://m.htxk.kf',
  TEST: 'https://m.hhlysport.com',
  PRODUCTION: 'https://m.13322ty.com',
  PRE: 'https://yum.hhlyty.com'
};

/*export const API_HOST = {
  TEST       : 'http://m.htxk.com/api/v1',
  DEV        : 'http://m.htxk.dev/api/v1',
  // DEV        : 'http://192.168.31.28:8080/api/v1',
  PRODUCTION : 'https://m.oooseed.com/api/v1',
  BASE       : 'http://m.htxk.base/api/v1',
  BIZ        : 'http://m.htxk.base/api/v1',
  PROFIT     : 'http://m.htxk.profit/api/v1',
  PRE        : 'https://yum.hhlysport.com/api/v1'
};*/

export const API_VERSION = {
  'V1': '/api/v1',
  'OPEN': '/open/api/v1'
};
/**
 * @description 获取此程序地址栏文件夹路径
 * @author chenwenhao-576
 * @date 2017-08-25
 * @type {string}
 */
export const SERVER_HOST = window.location.href.split('#')[0] + '#/' || window.location.href;

export const DOWNLOAD_APP_PATH = location.protocol + '//' + location.host + '/activity/index.html';

/**
 * @description 请求客户端类型
 */
export const CLIENT_TYPE = '4';

/**
 * @description 支付类型
 * 0：支付宝，1：微信支付，2：微信公众号支付
 * @type {[string , string , string]}
 */
export const PAYMENT_PAY_TYPE = ['without.h5.alipay', 'without.h5.wechat', 'without.js.wechat'];



